<fieldset>
  <%= form.input :name, required: true %>
  <%= form.input :permalink, required: true if form.object.persisted? %>
  <%= form.input :env_value, label: "Value in $DEPLOY_GROUPS" %>
  <%= form.input :environment_id, required: true do %>
    <%= form.collection_select :environment_id, Environment.all, :id, :name, {}, { class: 'form-control' } %>
  <% end %>

  <% if Samson::Secrets::Manager.backend == Samson::Secrets::HashicorpVaultBackend %>
    <%= form.input :vault_server_id do %>
      <%= form.collection_select(
            :vault_server_id,
            Samson::Secrets::VaultServer.select(:id, :name).all, :id, :name,
            {include_blank: true}, { class: 'form-control' })
      %>
    <% end %>
  <% end %>

  <%= Samson::Hooks.render_views(:deploy_group_form, self, form: form) %>
</fieldset>
